# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=sweeper
pkgver=20.04.3
pkgrel=0
arch="all !armhf"
url="https://kde.org/applications/utilities/org.kde.sweeper"
pkgdesc="System cleaner to help clean unwanted traces the user leaves on the system"
license="LGPL-2.1-or-later"
makedepends="extra-cmake-modules qt5-qtbase-dev kactivities-stats-dev kbookmarks-dev kcrash-dev kconfig-dev kconfigwidgets-dev kcoreaddons-dev kdoctools-dev ki18n-dev kio-dev ktextwidgets-dev kxmlgui-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/sweeper-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="6c801c29b01d7c75c83eb7853ae31e4e4821d0bba0d6337a224ce0baea578268dc0ca2ae832f600b0c604fcf5dee776441bfa02ceed10b5a29db733b43a940ea  sweeper-20.04.3.tar.xz"
